template<typename T1, typename T2>
struct YPair{
public:
  typedef T1 first_type;
  typedef T2 second_type;

  T1 first;
  T2 second;
  YPair():first(T1()),second(T2())
  {

  }
  YPair(const T1 &a, const T2 &b):first(a),second(b)
  {

  }

  template<class U1, class U2>
  YPair(const YPair<U1,U2> &p):first(p.first),second(p.second)
  {
      
  }

};

template<class Key>
struct hash{

};
#include <iostream>
template <>
struct hash<char>
{
  std::size_t operator()(char x) const
  {
    return x;
  }
};

template<class TP>
class Allocator{

};

template<class Iter>
struct iterator_traits{
  typedef typename Iter::iterator_category iterator_category;
  typedef typename Iter::value_type value_type;
  typedef typename Iter::difference_type difference_type;
  typedef typename Iter::pointer pointer;
  typedef typename Iter::reference reference;
};

template<class Iter>
inline typename iterator_traits<Iter>::iterator_category _Iterator_category(const Iter &i) 
{
  typedef typename iterator_traits<Iter>::iterator_category category;
  return category();
}

template<class Iter>
inline typename iterator_traits<Iter>::value_type* _value_type(const Iter &i)
{
  return static_cast<typename iterator_traits<Iter>::value_type *>(0);
}
template<class Iter>
inline typename iterator_traits<Iter>::difference_type * _distance(const Iter &i)
{
  return static_cast<typename iterator_traits<Iter>::difference_type *>(0);
}